export default {
  data() {
    return {
      // 表单
      form: {
        number: '', // 单号
        sendType: 0, // 寄件类型(0国内寄件 1老挝-中国 2中国-老挝)
        jsonList: [], // 子单信息
        /******************************************/
        senderName: '', laosSenderName: '', // 寄件人姓名
        beginPlace: '', laosBeginPlace: '', // 始发地
        senderCompanyName: '', laosSenderCompanyName: '', // 寄件单位名称
        senderAddress: '', laosSenderAddress: '', // 寄件人详细地址
        senderPhone: '', // 寄件人联系电话
        senderId: '', // 寄件人证件号

        receiverName: '', laosReceiverName: '', // 收件人姓名
        endPlace: '', laosEndPlace: '', // 目的地
        receiverCompanyName: '', laosReceiverCompanyName: '', // 收件单位名称
        receiverAddress: '', laosReceiverAddress: '', // 收件人详细地址
        receiverPhone: '020', // 收件人联系电话
        receiverId: '', // 收件人证件号

        expressSort: 0, // 快递种类(0 物品 1 文件)
        billingWay: 0, // 计费方式(0 重量)

        isProtect: 0, // 是否保价(0 不保价 1 保价)
        protectWay: 0, // 保价方式(0 普通 1 易碎品)
        coverage: 0, // 保额
        protectFee: 0, // 保价费

        isCustomsFee: 0, // 是否需要报关费(0 不需要 1 需要)
        customsFee: 0, // 报关费

        weight: 0, // 重量
        freight: 0, // 运费
        websiteClearingWay: null, // 结算方式(0 寄付 1 到付)

        loans: 0, // 待收贷款
        specialPlaceFee: 0, // 特殊区域费
        packFee: 0, // 包装费
        totalFee: 0, // 总计
        /******************************************/
        articleName: '', laosArticleName: '', enArticleName: '', // 品名

        dutyParagraph: '', // 税号
        specification: '', // 规格

        roughWeight: 0, // 毛重
        netWeight: 0, // 净重
        insideRoughWeight: 0, // 内件毛重

        insideCount: 1, // 内件数量
        declarationUnitFee: 0, // 申报单价
        declarationTotalFee: 0, // 申报总价
        measureUnit: '千克', // 计量单位

        taxRate: 0, // 税率
        receivableTax: 0, // 应收税额
        realTax: 0, // 实收税额
        repairTax: 0, // 补收税额

        senderCity: '', enSenderCity: '', // 发件人城市

        enSenderName: '', // 发件人
        enSenderAddress: '', // 寄件人详细地址

        receiverCity: '', // 收件人城市
        saleCity: '', // 产销城市

        senderCountry: '142', // 发件人国别
        detailNotes: '', // 备注(内件明细)
        /******************************************/
        state: 0, // 0揽收 1发出 2到达 3待取件 4问题件 5签收
        notes: '', laosNotes: '', // 备注
        courierId: null, // 快递员
        currentUserId: null, currentUserName: '', currentName: '', laosCurrentName: '', // 当前网点名称id
        sendToUserId: null, sendToUserName: '', sendToName: '', laosSendToName: '', // 发往网点名称id
      },
      // 规则
      rules: {
        number: {required: true, message: '请输入单号', trigger: 'blur'},

        senderName: {required: true, message: '请输入寄件人姓名', trigger: 'change'},
        beginPlace: {required: true, message: '请输入始发地', trigger: 'blur'},
        senderAddress: {required: true, message: '请输入寄件人地址', trigger: 'blur'},
        laosSenderName: {required: true, message: '请输入寄件人姓名', trigger: 'blur'},
        laosBeginPlace: {required: true, message: '请输入始发地', trigger: 'blur'},
        laosSenderAddress: {required: true, message: '请输入寄件人地址', trigger: 'blur'},
        senderPhone: {required: true, message: '请输入寄件人联系电话', trigger: 'blur'},
        senderId: {required: true, message: '请输入寄件人证件号', trigger: 'blur'},

        receiverName: {required: true, message: '请输入收件人姓名', trigger: 'change'},
        endPlace: {required: true, message: '请输入目的地', trigger: 'blur'},
        receiverAddress: {required: true, message: '请输入收件人地址', trigger: 'blur'},
        laosReceiverName: {required: true, message: '请输入收件人姓名', trigger: 'blur'},
        laosEndPlace: {required: true, message: '请输入目的地', trigger: 'blur'},
        laosReceiverAddress: {required: true, message: '请输入收件人地址', trigger: 'blur'},
        receiverPhone: {required: true, message: '请输收件人联系电话', trigger: 'blur'},

        coverage: {required: true, message: '请输入保额', trigger: 'change'},
        protectFee: {required: true, message: '请输入保价费', trigger: 'change'},
        customsFee: {required: true, message: '请输入报关费金额', trigger: 'change'},
        weight: {required: true, message: '请输入重量', trigger: 'change'},
        freight: {required: true, message: '请输入运费', trigger: 'change'},
        websiteClearingWay: {required: true, message: '请选择结算方式', trigger: 'change'},

        sendToUserId: {required: true, message: '请选择发往网点', trigger: 'change'}
      }
    }
  }
}
